namespace ext
{
	using System;
	using System.Runtime.CompilerServices;
	using System.Html;
	using System.Collections;
	
	
	/// <summary>
	/// Simple color palette class for choosing colors. The palette can be rendered to any container. 
	/// Here&apos;s an example of typical usage:
	/// 
	/// var cp = new Ext.ColorPalette({value:&apos;993300&apos;}); // initial selected color
	/// cp.render(&apos;my-div&apos;);
	///
	/// cp.on(&apos;select&apos;, function(palette, selColor){
	/// // do something with selColor
	/// });
	/// </summary>
	/// <htmlSummary>
	/// Simple color palette class for choosing colors. The palette can be rendered to any container.&lt;br /&gt;
	/// Here&apos;s an example of typical usage:
	/// &lt;pre&gt;&lt;code&gt;
	/// var cp = new Ext.ColorPalette({value:&apos;993300&apos;}); // initial selected color
	/// cp.render(&apos;my-div&apos;);
	///
	/// cp.on(&apos;select&apos;, function(palette, selColor){
	/// // do something with selColor
	/// });
	/// &lt;/code&gt;&lt;/pre&gt;
	/// </htmlSummary>
	/// <definedin>src\widgets\ColorPalette.js</definedin>
	[ScriptName("ColorPalette")]
	[ScriptNamespace("Ext")]
	[Imported()]
	public partial class ColorPalette : ext.Component
	{
		
		#region Constructors
		/// <summary>Constructor</summary>
		/// <param name="config">The config object</param>
		public ColorPalette(ext.ColorPalette_Configuration config)
		{
		}
		
		/// <summary>Constructor</summary>
		public ColorPalette()
		{
		}
		#endregion
		
		#region Fields
		/// <summary>An existing XTemplate instance to be used in place of the default template for rendering the component.</summary>
		/// <definedin>src\widgets\ColorPalette.js</definedin>
		[ScriptName("tpl")]
		public string Tpl;
		
		/// <summary>The CSS class to apply to the containing element (defaults to &apos;x-color-palette&apos;)</summary>
		/// <definedin>src\widgets\ColorPalette.js</definedin>
		[ScriptName("itemCls")]
		public string ItemCls;
		
		/// <summary>
		/// The initial color to highlight (should be a valid 6-digit color hex code without the # symbol). Note that
		/// the hex codes are case-sensitive.
		/// </summary>
		/// <definedin>src\widgets\ColorPalette.js</definedin>
		[ScriptName("value")]
		public string Value;
		
		/// <summary>
		/// The DOM event that will cause a color to be selected. This can be any valid event name (dblclick, contextmenu).
		/// Defaults to &apos;click&apos;.
		/// </summary>
		/// <htmlSummary>
		/// The DOM event that will cause a color to be selected. This can be any valid event name (dblclick, contextmenu).
		/// Defaults to &lt;tt&gt;&apos;click&apos;&lt;/tt&gt;.
		/// </htmlSummary>
		/// <definedin>src\widgets\ColorPalette.js</definedin>
		[ScriptName("clickEvent")]
		public string ClickEvent;
		
		/// <summary>If set to true then reselecting a color that is already selected fires the {@link #select} event</summary>
		/// <definedin>src\widgets\ColorPalette.js</definedin>
		[ScriptName("allowReselect")]
		public bool AllowReselect;
		
		/// <summary>
		/// Optional. A function that will handle the select event of this palette.
		/// The handler is passed the following parameters:   palette : ColorPalette The {@link #palette Ext.ColorPalette}.   color : String The 6-digit color hex code (without the # symbol).
		/// </summary>
		/// <htmlSummary>
		/// Optional. A function that will handle the select event of this palette.
		/// The handler is passed the following parameters:&lt;div class=&quot;mdetail-params&quot;&gt;&lt;ul&gt;
		/// &lt;li&gt;&lt;code&gt;palette&lt;/code&gt; : ColorPalette&lt;div class=&quot;sub-desc&quot;&gt;The {@link #palette Ext.ColorPalette}.&lt;/div&gt;&lt;/li&gt;
		/// &lt;li&gt;&lt;code&gt;color&lt;/code&gt; : String&lt;div class=&quot;sub-desc&quot;&gt;The 6-digit color hex code (without the # symbol).&lt;/div&gt;&lt;/li&gt;
		/// &lt;/ul&gt;&lt;/div&gt;
		/// </htmlSummary>
		/// <definedin>src\widgets\ColorPalette.js</definedin>
		[ScriptName("handler")]
		public System.Delegate Handler;
		
		/// <summary>
		/// The scope (this reference) in which the {@link #handler}
		/// function will be called. Defaults to this ColorPalette instance.
		/// </summary>
		/// <htmlSummary>
		/// The scope (&lt;tt&gt;&lt;b&gt;this&lt;/b&gt;&lt;/tt&gt; reference) in which the &lt;code&gt;{@link #handler}&lt;/code&gt;
		/// function will be called. Defaults to this ColorPalette instance.
		/// </htmlSummary>
		/// <definedin>src\widgets\ColorPalette.js</definedin>
		[ScriptName("scope")]
		public object Scope;
		
		/// <summary>Fires when a color is selected</summary>
		/// <definedin>src\widgets\ColorPalette.js</definedin>
		[ScriptName("selectEventName")]
		public const string SelectEventName = "select";
		
		/// <summary>@hide</summary>
		/// <definedin>src\widgets\ColorPalette.js</definedin>
		[ScriptName("autoEl")]
		public string AutoEl;
		#endregion
		
		#region Properties
		/// <summary>
		/// An array of 6-digit color hex code strings (without the # symbol). This array can contain any number
		/// of colors, and each hex code should be unique. The width of the palette is controlled via CSS by adjusting
		/// the width property of the &apos;x-color-palette&apos; class (or assigning a custom class), so you can balance the number
		/// of colors with the width setting until the box is symmetrical.  You can override individual colors if needed:  
		/// var cp = new Ext.ColorPalette();
		/// cp.colors[0] = &apos;FF0000&apos;; // change the first box to red
		/// 
		///
		/// Or you can provide a custom array of your own for complete control:
		/// 
		/// var cp = new Ext.ColorPalette();
		/// cp.colors = [&apos;000000&apos;, &apos;993300&apos;, &apos;333300&apos;];
		/// </summary>
		/// <htmlSummary>
		/// &lt;p&gt;An array of 6-digit color hex code strings (without the # symbol). This array can contain any number
		/// of colors, and each hex code should be unique. The width of the palette is controlled via CSS by adjusting
		/// the width property of the &apos;x-color-palette&apos; class (or assigning a custom class), so you can balance the number
		/// of colors with the width setting until the box is symmetrical.&lt;/p&gt;
		/// &lt;p&gt;You can override individual colors if needed:&lt;/p&gt;
		/// &lt;pre&gt;&lt;code&gt;
		/// var cp = new Ext.ColorPalette();
		/// cp.colors[0] = &apos;FF0000&apos;; // change the first box to red
		/// &lt;/code&gt;&lt;/pre&gt;
		///
		/// Or you can provide a custom array of your own for complete control:
		/// &lt;pre&gt;&lt;code&gt;
		/// var cp = new Ext.ColorPalette();
		/// cp.colors = [&apos;000000&apos;, &apos;993300&apos;, &apos;333300&apos;];
		/// &lt;/code&gt;&lt;/pre&gt;
		/// </htmlSummary>
		/// <definedin>src\widgets\ColorPalette.js</definedin>
		[ScriptName("colors")]
		[IntrinsicProperty()]
		public System.Array Colors
		{
			get
			{
				throw new System.Exception("Imported - not implemented");
			}
			set
			{
			}
		}
		#endregion
		
		#region Methods
		/// <summary>Selects the specified color in the palette (fires the {@link #select} event)</summary>
		/// <definedin>src\widgets\ColorPalette.js</definedin>
		/// <param name="color">A valid 6-digit color hex code (# will be stripped if included)</param>
		/// <param name="suppressEvent">True to stop the select event from firing. Defaults to &lt;tt&gt;false&lt;/tt&gt;.</param>
		[ScriptName("select")]
		public void SelectMethod(string color, bool suppressEvent)
		{
			throw new System.Exception("Imported - not implemented");
		}
		
		/// <summary>Selects the specified color in the palette (fires the {@link #select} event)</summary>
		/// <definedin>src\widgets\ColorPalette.js</definedin>
		/// <param name="color">A valid 6-digit color hex code (# will be stripped if included)</param>
		[ScriptName("select")]
		public void SelectMethod(string color)
		{
			throw new System.Exception("Imported - not implemented");
		}
		#endregion
		
		#region Events
		/// <summary>Fires when a color is selected</summary>
		/// <definedin>src\widgets\ColorPalette.js</definedin>
		[ScriptName("select")]
		public event ext.auto.Delegate_ext_ColorPalette_And_System_String Select;
		#endregion
	}
}
